package com.itheima.zhuanhuan;

import java.io.*;
import java.nio.charset.Charset;

public class Demo04 {

    public static void main(String[] args) throws IOException {
        //缓冲字符输入流
        BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\Administrator\\Desktop\\斗罗大陆.txt", Charset.forName("GBK")));
//缓冲字符输出流
        BufferedWriter writer = new BufferedWriter(new FileWriter("day13\\copy\\bbbb.txt"));
        long start = System.currentTimeMillis();
        String s;
        while ((s=reader.readLine())!=null){
            writer.write(s);
            writer.newLine();
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);//253
        reader.close();
        writer.close();





    }
}
